package com.sinosoft.emplmis.application.web.dto;

import com.sinosoft.framework.core.api.domain.RoleEntity;
import com.sinosoft.framework.core.common.utils.ObjectUtil;

/**
 * 角色数据传输对象
 * @author xiaoxiong
 *
 */
public class RoleData implements java.io.Serializable{

	private static final long serialVersionUID = 1L;

	private Integer id;
	
	private String name;
	
	private String roleCode;
	
	private String description;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRoleCode() {
		return roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * 数据转换
	 * @param roleData
	 * @param roleEntity
	 */
	public void toRoleData(RoleData roleData, RoleEntity roleEntity) {
		try {
			ObjectUtil.oldToNew(roleData, roleEntity, "serialVersionUID");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
